package com.tz.farm_feeding.domain;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.alibaba.fastjson.JSONObject;

public class Sell {
    private Integer id;

    private Date date;

    private Double price;

    private Double marketprice;

    private Date selldate;

    private Integer sellcount;

    @Override
    public String toString() {
      JSONObject jsonObject = new JSONObject();
      SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
      jsonObject.put("id", getId());
      jsonObject.put("date", simpleDateFormat.format(getDate()));
      jsonObject.put("price", getPrice());
      jsonObject.put("marketprice", getMarketprice());
      jsonObject.put("sellcount", getSellcount());
      jsonObject.put("selldate", simpleDateFormat.format(getSelldate()));
      return jsonObject.toJSONString();
    }
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Double getMarketprice() {
        return marketprice;
    }

    public void setMarketprice(Double marketprice) {
        this.marketprice = marketprice;
    }

    public Date getSelldate() {
        return selldate;
    }

    public void setSelldate(Date selldate) {
        this.selldate = selldate;
    }

    public Integer getSellcount() {
        return sellcount;
    }

    public void setSellcount(Integer sellcount) {
        this.sellcount = sellcount;
    }
}